This application incorporates by reference Taiwanese application Serial No. 89111198, filed Jun. 8, 2000.
1. Field of the Invention
The invention relates in general to a method for the embedding of bootable programs into a memory apparatus, and more particularly to a method for the embedding of an operating system and an application program into a memory apparatus.
2. Description of the Related Art
As computer systems are used more widely, the number of users increases as well. For the management of users in a common working environment such as a local area network in a school or company, or the Internet, a server is utilized. Servers effectively integrate and manage resources and data commonly used by all users and eliminates redundant storage of identical data over users"" computer systems.
The operating system and application programs of a server are commonly installed and stored in a hard drive of the server. The installation and setting of hardware parameters normally require a lot of time. Besides, these operating system and application programs require a large amount of storage space of the hard drive, increasing the hardware requirement and related cost. In circumstances when the server is accessing the hard drive, a power failure or illegal operations will likely lead to a system crash or failure. If system failure occurs, the time and man-hours are wasted in the recovery of the system. In a worse case scenario, the system will have to be reinstalled completely and the cost of the loss of important data and the cost of recovering the system are incalculable.
It is therefore an object of the invention to provide a method for the embedding of the operating system and application programs into a memory apparatus. When the system is installed with the memory apparatus embedded with the operating system and application programs according to the invention, it reduces much of the time of installation and setting for the operating system and application programs. Besides, a shorter period of time, within a minute, is required to boot up a system installed with the memory apparatus as compared to a system that uses the hard drive for storing the operating system. Since the operating system and the application programs are embedded and installed into the memory apparatus, the system will not be damaged even if power failure or illegal operations occur. The size of the memory apparatus is much smaller than if stored in the hard drive, resulting in a large amount of the memory space of the hard drive being available. Moreover, it has the advantage of the fast execution of the operating system and application programs, thus providing efficient and convenient installation, setting, and usage of the system for the users and the administrators.
The invention achieves the above-identified objects by providing a method for embedding an operating system and an application program into a memory apparatus, such as a flash ROM. The operating system, such as the UNIX operating system, includes a boot file and a run control (RC) program and the method includes the steps as follows. First, source codes of the operating system are processed for obtaining a crunch file of the operating system by applying a crunch technique. The crunch file of the operating system is then compiled, resulting in an executable file of the operating system which is then compressed into a system compression file. Next, eliminating unnecessary comments and settings from the source codes of the application program, a compact version of the application program is obtained. After that, a program storage file is mounted as a mount point through a virtual node technique. Next, the compact version of the application program is copied to the mount point. The program storage file is then compressed into a program compression file. After that, the memory apparatus is formatted and the boot file, the system compression file, and the program compression file are copied to the formatted memory apparatus.
Additionally, the run control program is modified so that the run control program is able to check whether the file system of the memory apparatus is functioning properly: if not, correcting the file system; to set the memory apparatus to be read only; to mount the program compression file in the memory apparatus as a program storage directory through the virtual node technique; to automatically detect and install a hard disk drive and to automatically format the hard disk drive if the hard disk drive is not formatted; and then to automatically detect and set a network interface card and to set a parameter of the network interface card according to slots available in sequence.